/*     */ package com.lmpop.trade.ti_job;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import com.lmpop.frame.util.FileIO;
/*     */ import com.lmpop.trade.ts_module.Ts_moduleInfo;
/*     */ import com.lmpop.updateHtml.parseXml.Config;
/*     */ import com.lmpop.updateHtml.updateHtml.UpdateArticleHtml;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_jobInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */   UpdateArticleHtml uah;
/*     */   FileIO io;
/*     */   Config conf;
/*     */   String rootpath;
/*     */ 
/*     */   public Ti_jobInfo()
/*     */   {
/*  23 */     this.queryList = new QueryList();
/*  24 */     this.uah = new UpdateArticleHtml();
/*  25 */     this.io = new FileIO();
/*  26 */     this.conf = new Config();
/*  27 */     this.conf.init();
/*  28 */     this.rootpath = this.conf.getString("rootpath");
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  37 */     Ti_job ti_job = new Ti_job();
/*  38 */     ti_job.setJob_id(map.getString("job_id"));
/*  39 */     ti_job.setCust_id(map.getString("cust_id"));
/*  40 */     ti_job.setTitle(map.getString("title"));
/*  41 */     ti_job.setCompany(map.getString("company"));
/*  42 */     ti_job.setWork_type(map.getString("work_type"));
/*  43 */     ti_job.setClass_attr(map.getString("class_attr"));
/*  44 */     ti_job.setArea_attr(map.getString("area_attr"));
/*  45 */     ti_job.setDepart(map.getString("depart"));
/*  46 */     ti_job.setCareer(map.getString("career"));
/*  47 */     ti_job.setWork_exper(map.getString("work_exper"));
/*  48 */     ti_job.setSpecialty(map.getString("specialty"));
/*  49 */     ti_job.setSex(map.getString("sex"));
/*  50 */     ti_job.setBirth(map.getString("birth"));
/*  51 */     ti_job.setJob_desc(map.getString("job_desc"));
/*  52 */     ti_job.setSalary(map.getString("salary"));
/*  53 */     ti_job.setNum(map.getInt("num"));
/*  54 */     ti_job.setDegree(map.getString("degree"));
/*  55 */     ti_job.setEnd_date(map.getString("end_date"));
/*  56 */     ti_job.setContact(map.getString("contact"));
/*  57 */     ti_job.setPhone(map.getString("phone"));
/*  58 */     ti_job.setCellphone(map.getString("cellphone"));
/*  59 */     ti_job.setEmail(map.getString("email"));
/*  60 */     ti_job.setState_code(map.getString("state_code"));
/*  61 */     ti_job.setUser_id(map.getString("user_id"));
/*     */ 
/*  63 */     String result_code = "0";
/*     */     try {
/*  65 */       insert(dbmMgr, ti_job);
/*     */     } catch (ApplicationException e) {
/*  67 */       e.printStackTrace();
/*  68 */       result_code = "1";
/*     */     }
/*  70 */     map.setString("result_code", result_code);
/*  71 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_job ti_job)
/*     */     throws ApplicationException
/*     */   {
/*  80 */     dbmMgr.update("insertTi_job", ti_job);
/*     */   }
/*     */   public SysMap create_alterPage(DbmInterf dbmMgr, SysMap map) {
/*  83 */     this.uah.updateArticleByGoodsId("H3gFW8qV67C021j", map.getString("job_id"), "0", "1");
/*  84 */     return map;
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  93 */     String pkid_string = map.getString("pkid");
/*  94 */     Ts_moduleInfo moduleInfo = new Ts_moduleInfo();
/*  95 */     String modulepath = moduleInfo.getSavaPathByCode("recruit");
/*  96 */     String result_code = "0";
/*     */     try {
/*  98 */       if (!pkid_string.equals("")) {
/*  99 */         String[] pkStr = pkid_string.split("\\|");
/* 100 */         List list = null;
/* 101 */         String publish_date = "";
/* 102 */         for (int i = 0; i < pkStr.length; i++)
/* 103 */           if (!pkStr[i].equals("")) {
/* 104 */             list = this.queryList.getList("getTi_jobByPk", pkStr[i]);
/* 105 */             publish_date = ((Hashtable)list.get(0)).get("in_date").toString();
/* 106 */             publish_date = publish_date.substring(0, 10);
/* 107 */             delete(dbmMgr, pkStr[i]);
/* 108 */             FileIO.DelFile(this.rootpath + modulepath + publish_date + "/" + pkStr[i] + ".html");
/*     */           }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e) {
/* 113 */       e.printStackTrace();
/* 114 */       result_code = "1";
/*     */     }
/* 116 */     map.setString("result_code", result_code);
/* 117 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/* 126 */     dbmMgr.update("deleteTi_job", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 136 */     Ti_job ti_job = new Ti_job();
/* 137 */     ti_job.setJob_id(map.getString("job_id"));
/* 138 */     ti_job.setTitle(map.getString("title"));
/* 139 */     ti_job.setCompany(map.getString("company"));
/* 140 */     ti_job.setWork_type(map.getString("work_type"));
/* 141 */     ti_job.setClass_attr(map.getString("class_attr"));
/* 142 */     ti_job.setArea_attr(map.getString("area_attr"));
/* 143 */     ti_job.setDepart(map.getString("depart"));
/* 144 */     ti_job.setCareer(map.getString("career"));
/* 145 */     ti_job.setWork_exper(map.getString("work_exper"));
/* 146 */     ti_job.setSpecialty(map.getString("specialty"));
/* 147 */     ti_job.setSex(map.getString("sex"));
/* 148 */     ti_job.setBirth(map.getString("birth"));
/* 149 */     ti_job.setJob_desc(map.getString("job_desc"));
/* 150 */     ti_job.setSalary(map.getString("salary"));
/* 151 */     ti_job.setNum(map.getInt("num"));
/* 152 */     ti_job.setDegree(map.getString("degree"));
/* 153 */     ti_job.setEnd_date(map.getString("end_date"));
/* 154 */     ti_job.setContact(map.getString("contact"));
/* 155 */     ti_job.setPhone(map.getString("phone"));
/* 156 */     ti_job.setCellphone(map.getString("cellphone"));
/* 157 */     ti_job.setEmail(map.getString("email"));
/* 158 */     ti_job.setUser_id(map.getString("user_id"));
/*     */ 
/* 160 */     String result_code = "0";
/*     */     try {
/* 162 */       update(dbmMgr, ti_job);
/* 163 */       this.uah.updateArticleByGoodsId("H3gFW8qV67C021j", map.getString("job_id"), "0", "1");
/*     */     } catch (ApplicationException e) {
/* 165 */       e.printStackTrace();
/* 166 */       result_code = "1";
/*     */     }
/* 168 */     map.setString("result_code", result_code);
/* 169 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_job ti_job)
/*     */     throws ApplicationException
/*     */   {
/* 178 */     dbmMgr.update("updateTi_job", ti_job);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 189 */     Map ti_job = (Hashtable)obj;
/* 190 */     if (start == 0)
/* 191 */       start = 0;
/*     */     else {
/* 193 */       start = (start - 1) * limit;
/*     */     }
/* 195 */     ti_job.put("start", Integer.valueOf(start));
/* 196 */     ti_job.put("limit", Integer.valueOf(limit));
/* 197 */     return this.queryList.getList("getListByTi_jobPage", ti_job);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 209 */     Map ti_job = (Hashtable)obj;
/* 210 */     List list = this.queryList.getList("getCountByObjTi_job", ti_job);
/* 211 */     int count = 0;
/* 212 */     if ((list != null) && (list.size() > 0)) {
/* 213 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 214 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 215 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 218 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 228 */     return this.queryList.getList("getTi_jobByPk", pk);
/*     */   }
/*     */ 
/*     */   public SysMap upateState(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 238 */     Ti_job ti_job = new Ti_job();
/* 239 */     String pkid_string = map.getString("pkid");
/* 240 */     String state_code = map.getString("up_operating");
/* 241 */     String remark = map.getString("remark");
/* 242 */     ti_job.setState_code(state_code);
/* 243 */     ti_job.setRemark(remark);
/* 244 */     String result_code = "0";
/*     */     try {
/* 246 */       if (!pkid_string.equals("")) {
/* 247 */         String[] pkStr = pkid_string.split("\\|");
/* 248 */         for (int i = 0; i < pkStr.length; i++)
/* 249 */           if (!pkStr[i].equals("")) {
/* 250 */             ti_job.setJob_id(pkStr[i]);
/* 251 */             upateState(dbmMgr, ti_job);
/*     */           }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e)
/*     */     {
/* 257 */       e.printStackTrace();
/* 258 */       result_code = "1";
/*     */     }
/* 260 */     map.setString("result_code", result_code);
/* 261 */     return map;
/*     */   }
/*     */ 
/*     */   public void upateState(DbmInterf dbmMgr, Ti_job ti_job)
/*     */     throws ApplicationException
/*     */   {
/* 270 */     dbmMgr.update("upateJobState", ti_job);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_job.Ti_jobInfo
 * JD-Core Version:    0.6.0
 */